package com.itheima06;

/**
 * @author Xiao
 * @date 2021/7/18
 */
public class InnerDemo04 {
    public static void main(String[] args) {
        goSwimming(new Swimming() {
            @Override
            public void swim() {
                System.out.println("我会游泳啦！");
            }
        });
        goSwimming(() -> System.out.println("我会游泳啦！！！"));
    }
    public static void goSwimming(Swimming s){
        s.swim();
    }
}

interface Swimming {
    void swim();
}